﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;

namespace StudyStationWEBAPI.Model
{
    public class StationContext:DbContext
    {
        public StationContext(DbContextOptions<StationContext> options): base(options)
        {
            this.Database.EnsureCreated(); //自动建库建表
        }
        public DbSet<User> Users { get; set; }
        public DbSet<StudyResource> StudyResources { get; set; }
        public DbSet<Comment> Comments { get; set; }
    }
}
